﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;

namespace DomainModel.Entities
{
    public class Artist
    {
        [KeyAttribute]
        public int ArtistID { get; set; }

        public int? LargePictureID { get; set; }
        [ForeignKey("LargePictureID")]
        public virtual Picture LargePicture { get; set; }

        public int? SmallPictureID { get; set; }
        [ForeignKey("SmallPictureID")]
        public virtual Picture SmallPicture { get; set; }

        public string UserName { get; set; }
       /* [ForeignKey("UserId")]
        public virtual User User { get; set; }*/

        public int FileHostID { get; set; }
        [ForeignKey("FileHostID")]
        public virtual FileHost FileHost { get; set; }
        
        [Display(Name = "Artist Name")]
        [Required(ErrorMessage = "Name is required")]
        [StringLength(50, ErrorMessage = "Name may not be longer than 50 characters")]
        public string ArtistName { get; set; }

        [Display(Name = "Artist Description")]
        public string ArtistDesc { get; set; }

        public DateTime? LastUpdate { get; set; }       

        public bool IsApproved { get; set; }       
                
        public int HitCount { get; set; }

        public virtual ICollection<Album> Albums { get; set; }
    }
}
